package com.hwj.mapper;

import com.hwj.entity.Post;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Administrator
* @description 针对表【t_post】的数据库操作Mapper
* @createDate 2023-12-12 01:40:32
* @Entity com.hwj.entity.Post
*/
@Mapper
public interface PostMapper {
    List<Post> page(@Param("post") Post post, @Param("postTypeName") String postTypeName);

    List<Post> pageManage(@Param("post") Post post);

    int deleteByPrimaryKey(Long id);

    int insert(Post record);

    int insertSelective(Post record);

    Post selectByPrimaryKey(Long id);

    List<Post> selectByUserIdPosts(Long userId);

    int updateByPrimaryKeySelective(Post record);

    int updateByPrimaryKey(Post record);


    List<Post> pageExam(@Param("post") Post post);

    List<Post> myStarPost(Long userId);

    List<Post> myExamPost(Long userId);


    List<Post> myPublishPost (Long userId);

    List<Post> search(String title);

    List<Post> tag(String tag);

    List<Post> listAll();

    int deleteForever(Long postId);

    List<Post> underPost(Long userId);

    List<Post> myLikePost(Long userId);

    List<Post> myPost(Long userId);
}
